package com.speedcar.base.result;

import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;

@ConfigurationProperties(prefix = "speedcar.base.wrap")
@Component
@Data
public class ScWrapDetectionProperties {

    /**
     * 包装特征字段
     */
    private Set<String> indicators = new HashSet<>(Arrays.asList(
            "code", "message", "data", "result", "returnCode", "msg"
    ));

    /**
     * 判定为已包装对象所需的最少特征字段数
     */
    private int minIndicators = 3;

    /**
     * 是否启用智能检测
     */
    private boolean smartDetection = true;
}
